<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .black-cell {
            width: 50px;
            height: 50px;
            background: #000;
            position: absolute;
            top: 0;
            left: 0;
        }
    </style>

    <div id="qipan" style="width:400px;height:400px;border:1px solid #aaa;background:#fff; position: relative;"></div>

    <script>
        var frag = document.createDocumentFragment();
        for (var line = 0; line < 8; line++) {
            for (var column = 0; column < 8; column++) {
                if ((column + line) % 2 != 0) {
                    var div = document.createElement("div");
                    div.setAttribute("class", "black-cell");
                    div.style.top = (line * 50) + "px";
                    div.style.left = (column * 50) + "px";
                    frag.appendChild(div);
                }
            }
        }
        document.getElementById("qipan").appendChild(frag);
    </script>
</head>

<body>

</body>

</html>